import { createAction } from '../utils/redux'
import { CATEGORY_MENU ,PROD_PAGEPROD} from '../constants/category'
import { API_CATEGORY_MENU,API_PROD_PAGEPROD } from '../constants/api'

/**
 * 获取所有类别
 * @param {*} payload 
 */
export const dispatchCategoryMenu = payload => createAction({
    url: API_CATEGORY_MENU,
    type: CATEGORY_MENU,
    payload
})

/**
 * 根据categoryId获取商品
 * @param {*} payload 
 */
export const dispatchProdList = payload => createAction({
    url: API_PROD_PAGEPROD,
    type: PROD_PAGEPROD,
    payload
})